<?php
try {
    $db = new PDO("sqlite:main.sqlite");
    $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $exception) {
    return "Connection error: " . $exception->getMessage();
}
?>